
import sys
import pepe.p_utils.cht as x

if __name__ == '__main__':
    ''' Create data samples from (big) files.

    2010-09-21_2244 vp version 1, just reusing cht soubroutine
    '''
    if len(sys.argv) == 2:
        x.getSample(sys.argv[1])
    elif len(sys.argv) == 3:
        x.getSample(sys.argv[1], sys.argv[2])
    else:
        print """

        Create data samples from (big) files.

        sampler <file-name-mask> [<rows-to-sample>]

        example : sampler *.dat
        example : sampler *.dat 20000

        file-name-mask (mandatory)
            data filename (mask) to be processed

        rows-to-sample (optional)
            defines how many rows should be taken as sample from each file
            default (implicit) 10000
        """
